package com.mijie.homi.admin.dao.user;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.mijie.core.IBatisDao;
import com.mijie.homi.common.domain.Grade;

@Repository
public class GradeDao extends IBatisDao {

	public List<Grade> listGrade(){
		return this.selectList("listGrade");
	}
	
	public int addGrade(Grade grade){
		return this.insert("addGrade", grade);
	}
	
	public int updateGrade(Grade grade){
		return this.update("updateGrade", grade);
	}
	
	public Integer getCurrentHightGrade(){
		return this.selectInteger("getCurrentHightGrade");
	}
	
	public Grade getRefGradeByIntegral(int integral){
		return this.selectOne("getRefGradeByIntegral", integral);
	}
}
